from pydantic import BaseModel
from datetime import datetime

class BaseResp(BaseModel):
    class Config:
        json_encoders = {
            datetime: lambda v: v.strftime("%Y-%m-%d %H:%M:%S") if v else None,
        }
